﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using NewDDSys.Entity;
using NewDDSys.IBLL;
using NewDDSys.IDAL;
using NewDDSys.Factory;
using NewDDSys.Utility;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class Web_UptPass : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void btnOK_Click(object sender, EventArgs e)
    {
        if (txtOld.Text.ToString() != Session["用户信息.密码"].ToString())
        {
            Response.Write(" <script   language=javascript> window.alert( ' 原密码不正确！ ');</script> ");
            txtOld.Text = "";
            txtNew.Text = "";
        }
        else if (txtNew.Text.ToString() == "")
        {
            Response.Write(" <script   language=javascript> window.alert( ' 请输入新密码！ ');</script> ");
        }
        else
        {
            int f = BLLFactory.CreateYhBLL().UpdatePass(Session["用户信息.单位"].ToString(), Session["用户信息.部门"].ToString(), Session["用户信息.岗位"].ToString(), Session["用户信息.姓名"].ToString(), txtNew.Text.ToString());
            if (f >= 1)
                Response.Write(" <script   language=javascript> window.alert( ' 密码修改成功！ ');</script> ");
            
        }
    }
    protected void btnRepeat_Click(object sender, EventArgs e)
    {
        txtOld.Text = "";
        txtNew.Text = "";
    }
}
